import request from "./request";

// 获取装备列表
export const getEquipList = (form) => {
  return request({
    method: "GET",
    url: "/equipment/template/list",
    params: form,
  });
};

// 添加模型
export const saveEquipTemplate = (form) => {
  return request({
    method: "POST",
    url: "/equipment/template/save",
    data: form,
  });
};

// 添加装备
export const saveEquip = (form) => {
  return request({
    method: "POST",
    url: "/equipment/equipment/save",
    data: form,
  });
};

// 编辑模型
export const editEquipTemplate = (form) => {
  return request({
    method: "POST",
    url: "/equipment/template/edit",
    data: form,
  });
};

// 查询模型详情
export const getTemplateDetail = (form) => {
  return request({
    method: "GET",
    url: "/equipment/template/attributes",
    params: form,
  });
};

// 查询装备详情
export const getEquipDetail = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/attributes",
    params: form,
  });
};
// 查询蓝方装备参数
export const getBlueEquipDetail = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/blueAttributes",
    params: form,
  });
};
// 查询蓝方平台装备参数
export const getBlueEquipAttrs = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/bluePlatformAttributes",
    params: form,
  });
};
// 查询蓝方装备参数
export const getBlueEquipNameList = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/blueEquipmentNameList",
    params: form,
  });
};
// 编辑装备
// 编辑装备参数
export const editBlueEquipment = (form) => {
  return request({
    method: "POST",
    url: "/equipment/equipment/editBlue",
    data: form,
  });
};
// 编辑装备
// 编辑模型
export const editEquipment = (form) => {
  return request({
    method: "POST",
    url: "/equipment/equipment/edit",
    data: form,
  });
};
export const delEquip = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/delete",
    params: form,
  });
};
// 编辑数据链参数
export const editEquipmentAttribute = (form) => {
  return request({
    method: "POST",
    url: "/equipment/equipment/editDataLinkAttr",
    data: form,
  });
};

// 查询红方装备参数
export const getRedEquipDetail = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/blueAttributes",
    params: form,
  });
};
// 查询红方平台装备参数
export const getRedEquipAttrs = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/bluePlatformAttributes",
    params: form,
  });
};
// 查询红方装备参数
export const getRedEquipNameList = (form) => {
  return request({
    method: "GET",
    url: "/equipment/equipment/blueEquipmentNameList",
    params: form,
  });
};
// 编辑装备
// 编辑装备参数
export const editRedEquipment = (form) => {
  return request({
    method: "POST",
    url: "/equipment/equipment/editBlue",
    data: form,
  });
};
